package com.net.okhttphelper.constant;

/**
 *
 * @author ZDST-03
 * @date 2018/1/22
 * 常见的几种错误类型
 */
public enum ErrorEnum {

    ERROR_NO_NET(-100, "请检查网络连接！"),
    ERROR_EMPTY_DATA(-101,"服务器返回为空！"),
    ERROR_CONNECT(-102, "服务连接异常！"),
    ERROR_PARSE(-103,"解析服务器返回对象出错！"),
    ERROR_FAIL(-104,"操作失败，请重试！"),
    ERROR_PARAM_ERROR(-105,"参数错误！"),
    ERROR_SOCKET_TIME_OUT(-108,"请求超时！"),
    ERROR_FILE_NO_EXIST(-109,"文件不存在！"),
    ERROR_FILE_ZIP_FAIL(-110,"图片压缩失败，请重试！"),
    ERROR_DOWNLOAD_FAIL(-111,"下载失败，请重试！");

    int code;
    String message;

    ErrorEnum(int code , String message){
        this.code = code;
        this.message = message;
    }

    public int getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
